A computer mouse measures motion of the mouse and converts the motion to an electrical signal that may be used to control a pointer on a computer screen. A computer mouse also provides buttons to allow a user to interact with the computer. Commonly, computer mice sense and encode the motion of a ball as it moves across a surface. This type of mouse is called a mechanical mouse and includes mechanical moving parts. More recently an optical computer mouse has been introduced that uses changes between consecutive images of a surface to estimate motion of the mouse over a surface. This design avoids the use of moving parts.
A barcode reader or scanner is an optical device that is moved across a printed barcode pattern on an object. A photo-diode in the reader converts the light and dark lines of the barcode pattern into an electrical signal that can be decoded to provide information about the object. The decoding measures the durations of the high and low portions of the signal and uses these measurements to estimate the relative widths of the barcode line. The decoding is accurate provided that the motion of the reader across the barcode is reasonably steady and even.
Barcode readers have been combined with mechanical computer mice. This provides a convenience to the user, but does not provide any reduction in complexity, since an optical bar code reader has no parts in common with a mechanical mouse.